package com.monkeyboy.tree;

import com.monkeyboy.TreeNode;

/**
 * 题目：求二叉树的深度
 */
public class Tree11 {
    public int solution(TreeNode root){
        return root==null?0:1+Math.max(solution(root.left),solution(root.right));
    }
}
